-
Notifications
You must be signed in to change notification settings - Fork 55
chore: review context changes #290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| func (c *Client) SendRequest(method string, rawURL string, data url.Values, | ||
| headers map[string]interface{}, body ...byte) (*http.Response, error) { | ||
|
|
||
| return c.SendRequestWithContext(context.TODO(), method, rawURL, data, headers, body...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| return c.SendRequestWithContext(context.TODO(), method, rawURL, data, headers, body...) | |
| return c.SendRequestWithContext(context.Background(), method, rawURL, data, headers, body...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For all of these - TODO is "we plan to add context later" but there's no way for us to do that.
| Client: client, | ||
| Edge: os.Getenv("TWILIO_EDGE"), | ||
| Region: os.Getenv("TWILIO_REGION"), | ||
| ctx: context.TODO(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see where we use this, it makes me nervous that we're using this here
| return NewApiService(twilio.NewRequestHandler(client)) | ||
| } | ||
|
|
||
| func NewApiServiceWithCtx(requestHandler *twilio.RequestHandler) *ApiService { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure we need this method
Fixes
Preview PR: twilio/twilio-oai-generator#651
Checklist
If you have questions, please file a support ticket, or create a GitHub Issue in this repository.